
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Proudly presented by ECharts</title>
    {% for jsfile_name in script_list %}

        <script src="{{ host }}/{{ jsfile_name }}.js"></script>
    {% endfor %}
</head>

<body>
<div id="{{ chart_id }}" style="width:{{ my_width }};height:{{ my_height }}px;"></div>
    <script type="text/javascript">
        window.onload = function() {
            setTimeout(function() {
                var myChart_{{ chart_id }} = echarts.init(document.getElementById('{{ chart_id }}'), null, {renderer: '{{ renderer}}'});
                {{ custom_function }}
                var option_{{ chart_id }} = {{ options | safe }};
                myChart_{{ chart_id }}.setOption(option_{{ chart_id }});
                window.onresize = function() {
                    myChart_{{ chart_id }}.resize();
                };
            }, 1000);
        };
    </script>

</body>

</html>